﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
 <title lang="en">Test</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js"></script>
 <script type="text/javascript" src="interactive.js"></script>
 <style type="text/css">
 .ia$test,fest.com
 {
    color: #0000ff;
 }
 .simple
 {
    font-size: 20px;
 }
 ia:my
 {
    background-color: #ffeeee;
 }
 </style>
</head>

<body>
<div class="ia:test1:test2,sub-test3 ia@test1#test4 ia$test,fest.com simple ia:my">My text</div>

<script type="text/javascript">
var IA = new Interactive({
    'mE': 'zzz'
});


function Interactive(user)
{
    var that = this;

    this.version = '0.1';
        
    this.config = {
            // local currency
            currency: {
                text: 'CAD',
                symbol: '$'
            },
            me: user.me || 'yyy'
        };
    
    this.messages = {
            en: {
            
                // stub messages
                'units': 'units' + that.messages,
                // error messages
                'should_be_valid_price': 'Should be a valid price in ' + that.config.currency.text
            },
    
            fr: {
                
            }
        };
    
    this.mytest = function()
        {
            alert(that.config.me + ' said: ' + that.messages.en['should_be_valid_price'] + ' and ' + that.messages.en['units']);
        }
};

alert(IA.version);

IA.mytest();

</script>

</body>
</html>